/*
* SummaryController.java
* Created on  2015/5/28 20:28
* 版本       修改时间          作者      修改内容
* V1.0.1    2015/5/28       xfz    初始版本
*
*/

package com.infitecs.eyas.boiler;

import com.infitecs.eyas.boiler.model.Summary;
import com.infitecs.eyas.boiler.service.SummaryService;
import com.infitecs.eyas.constant.Constant;
import com.infitecs.eyas.step.service.StepService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;

/**
 * 类的描述信息
 *
 * @author xfz
 * @version 1.0.1
 */

@Controller
@RequestMapping("/boiler/summary")
public class SummaryController {

    @Autowired
    private SummaryService summaryService;
    @Autowired
    private StepService stepService;

    @RequestMapping(value = "saveTheValueOfE96",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE96(@RequestParam("E96")double E96,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE96(E96,caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE114",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE114(@RequestParam("E114")double E114,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE114(E114,caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE31",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE31(@RequestParam("E31")double E31,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE31(E31, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE115",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE115(@RequestParam("E115")double E115,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE115(E115,caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE119",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE119(@RequestParam("E119")double E119,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE119(E119,caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE32",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE32(@RequestParam("E32")double E32,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE32(E32,caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE120",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE120(@RequestParam("E120")double E120,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE120(E120, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE101",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE101(@RequestParam("E101")double E101,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE101(E101, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE102",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE102(@RequestParam("E102")double E102,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE102(E102, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE97",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE97(@RequestParam("E97")double E97,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE97(E97, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE33",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE33(@RequestParam("E33")double E33,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE33(E33, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE98",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE98(@RequestParam("E98")double E98,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE98(E98, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE99",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE99(@RequestParam("E99")double E99,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE99(E99, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE34",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE34(@RequestParam("E34")double E34,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE34(E34, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE100",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE100(@RequestParam("E100")double E100,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE100(E100, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE42",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE42(@RequestParam("E42")double E42,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE42(E42, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE113",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE113(@RequestParam("E113")double E113,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE113(E113, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE118",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE118(@RequestParam("E118")double E118,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE118(E118, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE112",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE112(@RequestParam("E112")double E112,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE112(E112, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE130",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE130(@RequestParam("E130")double E130,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE130(E130, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE41",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE41(@RequestParam("E41")double E41,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE41(E41, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE131",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE131(@RequestParam("E131")double E131,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE131(E131, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE76",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE76(@RequestParam("E76")double E76,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE76(E76, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE110",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE110(@RequestParam("E110")double E110,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE110(E110, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE108",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE108(@RequestParam("E108")double E108,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE108(E108, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE109",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE109(@RequestParam("E109")double E109,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE109(E109, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE127",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE127(@RequestParam("E127")double E127,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE127(E127, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE126",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE126(@RequestParam("E126")double E126,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE126(E126, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE49",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE49(@RequestParam("E49")double E49,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE49(E49, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE50",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE50(@RequestParam("E50")double E50,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE50(E50, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE128",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE128(@RequestParam("E128")double E128,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE128(E128, caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "saveTheValueOfE129",method = {RequestMethod.POST})
    @ResponseBody
    public void saveTheValueOfE129(@RequestParam("E129")double E129,HttpSession httpSession){
        int caseId=Integer.parseInt(httpSession.getAttribute("caseId").toString());
        summaryService.saveTheValueOfE129(E129,caseId);
        stepService.updateStepStateing(caseId, Constant.STEP_ID_3);
    }
    @RequestMapping(value = "recover", method = RequestMethod.GET)
    @ResponseBody
    public Summary getSummary(HttpSession session) {
        int caseId = Integer.parseInt(session.getAttribute("caseId").toString());
        return summaryService.getSummary(caseId);
    }

    @RequestMapping(value = "calAgain", method = RequestMethod.GET)
    @ResponseBody
    public Summary calAgain(HttpSession httpSession){
        int caseId = Integer.parseInt(httpSession.getAttribute("caseId").toString());
        return summaryService.getSummary(caseId);
    }
}
